
<div class="ibox">
  <div class="ibox-title">
	  <h5>精选影片</h5>
	  <div class="nowrap pull-right" style="margin-top: 10px">
			<button onclick="history.go(-1);" data-title="返回"
				class='layui-btn layui-btn-small'>返回</button>
		</div>
  </div>
<div class="ibox-content fadeInUp animated">
  
<!-- 表单搜索 开始 -->
<form class="animated form-search" action="resource/index" onsubmit="return false" method="get" data-search>

    <div class="row">
    	<div class="col-xs-2">
            <div class="form-group">
            	<select name="source" class="input-sm form-control">
				    <option value="" >来源</option>
				    <#list source_list as _source>
				    <option value="${_source.id}" ${((_source.id)==(source!0))?string("selected","")} >${_source.name}</option>
				    </#list>
		    	</select>
            </div>
        </div>
    	<div class="col-xs-2">
            <div class="form-group">
            	<select name="region" class="input-sm form-control">
				    <option value="" >地区</option>
				    <#list region_list as _region>
				    <option value="${_region.id}" ${((_region.id)==(region!0))?string("selected","")} >${_region.name}</option>
				    </#list>
		    	</select>
            </div>
        </div>
    	<div class="col-xs-2">
            <div class="form-group">
            	<select name="language" class="input-sm form-control">
				    <option value="" >语言</option>
				    <#list language_list as _language>
				    <option value="${_language.id}" ${((_language.id)==(language!0))?string("selected","")} >${_language.name}</option>
				    </#list>
		    	</select>
            </div>
        </div>
    	<div class="col-xs-2">
            <div class="form-group">
            	<select name="type" class="input-sm form-control">
				    <option value="" >分类</option>
				    <#list type_list as _type>
				    <option value="${_type.id}" ${((_type.id)==(type!0))?string("selected","")} >${_type.name}</option>
				    </#list>
		    	</select>
            </div>
        </div>
        <div class="col-xs-3">
            <div class="form-group">
                <input type="text" name="title" value="${title!''}" placeholder="标题"
                       class="input-sm form-control">
            </div>
        </div>

        <div class="col-xs-1">
            <div class="form-group">
            	<input type='hidden' value='1' name='page'/>
                <button type="submit" class="btn btn-sm btn-white"><i class="fa fa-search"></i> 搜索</button>
            </div>
        </div>
    </div>
</form>
<!-- 表单搜索 结束 -->
              
<form onsubmit="return false;" data-auto="" method="POST">
    <input type="hidden" value="resort" name="action"/>
    <table class="table table-hover">
        <thead>
            <tr>
                <th class='text-center'>ID</th>
                <th class='text-center'>标题</th>
                <th class='text-center'>图片</th>
                <th class='text-center'>来源</th>
                <th class='text-center'>年份</th>
                <th class='text-center'>地区</th>
                <th class='text-center'>语言</th>
                <th class='text-center'>分类</th>
                <th class='text-center'>集数</th>
                <th class='text-center'>状态</th>
                <th class='text-center'>是否精选</th>
                <th class='text-center'>创建时间</th>
                <th class='text-center'>操作</th>
            </tr>
        </thead>
        <tbody>
        
        <#list page.data as model>
             <tr>
                <td class='text-center'>${model.id?c}</td>
                <td class='text-center'>${model.title!""}</td>
                <td class='text-center'>
                	<img data-tips-image="" style="height:auto;max-height:32px;min-width:32px" src="${model.img!''}"/>
                </td>
                <td class='text-center'>${model.source!""}</td>
                <td class='text-center'>${model.year!""}</td>
                <td class='text-center'>${model.region!""}</td>
                <td class='text-center'>${model.language!""}</td>
                <td class='text-center'>${model.type!""}</td>
                <td class='text-center'>${model.resource_num!""}</td>
                <td class='text-center'>
                     <span>${(model.status==0)?string("下线","<span style='color:#090'>上线</span>")}</span>
                </td>
                <td class='text-center'>
                	 <span>${(model.is_selected==0)?string("否","<span style='color:#090'>是</span>")}</span>
                </td>
                <td class='text-center'>${model.c_time!""}</td>
                <td class='text-center nowrap'>
                	<#if model.is_selected ==1>
                    <a data-update="${model.id?c}" data-field='is_selected' data-value='0'data-action='resource/updateSelected?is_selected=0' href="javascript:void(0)">取消精选</a>
                    <#else>
                    <a data-update="${model.id?c}" data-field='is_selected' data-value='1' data-action='resource/updateSelected?is_selected=1' href="javascript:void(0)">精选</a>
                    </#if>
               </td>
            </tr>
          </#list>      
       </tbody>
    </table>
<p>
<ul class="pagination pull-right"> 
	<#import "/common/page.html" as p> 
  	<@p.page data=page url="resource/selection_list" search_param=search_param />
</ul>
</p>
 
</form>

</div>  
</div>
